import { createRouter, createWebHistory, RouteRecordRaw } from "vue-router";
import Routers from "./routes";
// 路由配置 解构数组赋值
const routes: RouteRecordRaw[] = [...Routers];
const router = createRouter({
  history: createWebHistory(),
  routes,
});
router.beforeEach((to, from) => {
  console.log(to, from);

  document.title = to.meta.title as string;
  return true;
});
export default router;
